package top.datacluster.basic.niukewang;

import java.util.Scanner;

public class TestEncrypt {

    public void Encrypt (char[] aucPassword, char[] aucResult){
        for (int i = 0; i < aucPassword.length; i++){
            if (aucPassword[i] >= 'A' && aucPassword[i] <= 'Z'){
                char temp = Character.toLowerCase(aucPassword[i]);
                if (temp == 'z'){
                    temp = 'a';
                }else{
                    int k = temp + 1;
                    temp = (char)k;
                }
                aucResult[i] = temp;

            }else if (aucPassword[i] >= 'a' && aucPassword[i] <= 'z'){
                char temp = Character.toUpperCase(aucPassword[i]);
                if (temp == 'Z'){
                    temp = 'A';
                }else{
                    int k = temp + 1;
                    temp = (char)k;
                }
                aucResult[i] = temp;
            }else if (aucPassword[i] >= '0' && aucPassword[i] <= '9'){
                char temp = aucPassword[i];
                if (temp == '9'){
                    temp = '0';
                }else{
                    int k = temp + 1;
                    temp = (char)k;
                }
                aucResult[i] = temp;
            }
        }
    }

    public int unEncrypt (char[] result, char[] password){
        for (int i = 0; i < result.length; i++){
            if (result[i] >= 'A' && result[i] <= 'Z'){
                char temp = Character.toLowerCase(result[i]);
                if (temp == 'a'){
                    temp = 'z';
                }else{
                    int k = temp - 1;
                    temp = (char)k;
                }
                password[i] = temp;
            }else if (result[i] >= 'a' && result[i] <= 'z'){
                char temp = Character.toUpperCase(result[i]);
                if (temp == 'A'){
                    temp = 'Z';
                }else{
                    int k = temp - 1;
                    temp = (char)k;
                }
                password[i] = temp;
            }else if (result[i] >= '0' && result[i] <= '9'){
                char temp = result[i];
                if (temp == '0'){
                    temp = '9';
                }else{
                    int k = temp - 1;
                    temp = (char)k;
                }
                password[i] = temp;
            }
        }
        return 0;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i = 0;
        while (sc.hasNext()){
            String s = sc.nextLine();
            char[] p = s.toCharArray();
            if (i % 2 == 0){
                new TestEncrypt().Encrypt(p, p);
            }else{
                new TestEncrypt().unEncrypt(p, p);
            }

            for (char c : p){
                System.out.print(c);
            }
            System.out.print('\n');
        }


    }
}
